<div id="gallery" class="clear">
    <div id="gallery-inner">
        <?php for ($i = 1; $i <= 5; $i++): ?>
            <?php $picture = sprintf("pic%s", $i); ?>
            <div class="item-wrapper">
                <div id="<?php echo $picture; ?>-item" class="item">
                    <?php if($user->profile->$picture != null): ?>
                        <?php echo CHtml::image(ImageUtil::createImagePath($user->profile->$picture)); ?>
                    <?php endif; ?>
                </div>
                <?php echo CHtml::hiddenField($picture, $user->profile->$picture); ?>
                <div class="control"></div>
            </div>
            
            <div id="view-picture-<?php echo $picture; ?>-modal" style="display: none;">
                <div class="gallery-modal">
                    <div class="content">
                        <?php echo CHtml::image(ImageUtil::createImagePath($user->profile->$picture, ImageUtil::MEDIUM_PATH)); ?>
                    </div>
                    <div class="control">
                        <?php echo CHtml::button(TranslateUtil::t('Fake Report', array(), TranslateUtil::CATEGORY_BUTTON), array(
                            'class' => 'buttons send',
                            'ajax' => array(
                                'type' => 'POST',
                                'url' => CController::createUrl('//matches/fake')
                            )
                        )); ?>
                        <?php echo CHtml::button(TranslateUtil::t('Close', array(), TranslateUtil::CATEGORY_BUTTON), array(
                            'class' => 'buttons send closeDOMWindow'
                        )); ?>
                    </div>
                </div>
            </div>
        <?php endfor; ?>
    </div>
</div>

<?php ShortUtil::registerScript('gallery-model', $script); ?>